home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Applications / SnackTracker / SnackTracker Example Read Me < prev    next >
Text File  |  1998-06-23  |  3KB  |  57 lines

  1. SnackTracker 1.0 was created to keep track of employees' snack food purchases
  2. at a quickly growing company of around 100 people.  It writes purchase
  3. information to a text file, "datafilepdtest," which serves as a database for
  4. user information.  Each line of the file holds a record, which includes six
  5. fields, delineated by the pipe "|" symbol:  
  6. 1) last name
  7. 2) first name
  8. 3) login
  9. 4) password (default is no password)
  10. 5) group (on payroll "Y" or not on payroll "N", for billing purposes)
  11. 6) amount due
  12. The first record is a dummy record, with last name "Aaa."  This file is treated 
  13. as binary data for reading and writing.  In addition to the "datafile" file, the 
  14. "datafilebu" file serves as backup.  (Aliases are used in the program's actual 
  15. implementation because a total of three machines are set up to run the application, 
  16. one in each of the company's three kitchens.  All three write to the same four 
  17. files on a fourth machine, which acts as a server.)
  18.  
  19. Four peripheral files are required for proper functioning:
  20. 1) datafile (main database file)
  21. 2) datafilebu (backup file)
  22. 3) passadmin (to store the administrative password)
  23. 4) payrolltotals (to store totals due when submitted to accounting for
  24. payroll deduction)
  25.  
  26. The user is able to enter his or her login, a password if one exists, and a
  27. purchase amount.  The password may be changed at any time by selecting the
  28. "Change My Password" option under the "Passwords" menu.  The user may also
  29. view the current total due by selecting "What's My Total?" under the "Totals"
  30. menu.  
  31.  
  32. An administrator, with a separate password stored in the "passadmin" file
  33. (which may also be changed at any time by selecting the "Change the
  34. Admin Password" option under the "Accounting" menu), may add a new
  35. user, delete a current user, credit user payment, and display current user
  36. totals.  There are different windows, each under "Accounting," for each of
  37. these capabilities.  The initial default value for the admin password in this 
  38. example is no password.
  39.  
  40. When the totals are displayed by selecting "Display Totals," the administrator
  41. is also given the options to print the totals for reference only, or to print
  42. the totals and set them for use when they're deducted from the employees'
  43. paychecks.  In the current implementation, the totals are set and printed for
  44. delivery to the accounting department on the 15th of each month.  When pay
  45. deductions go into effect on the 20th, the administrator returns to the
  46. program and selects the "Credit Payment" screen under "Accounting," and hits
  47. the "Credit All Employees on Payroll" button.  This reads from a file that was
  48. written on the 15th when the totals were set, and goes through the stored
  49. information, crediting the appropriate users.  If no totals were set, the
  50. administrator is informed that the file is empty.  Manual entry of credited
  51. totals is necessary if a user has been deleted between the time the totals are
  52. set and the time the administrator attempts to credit all users on payroll.
  53. No changes are necessary if a new user has been added, however -- the new
  54. user's record will simply be skipped when totals are credited.
  55.  
  56. Beth Evans
  57. beth@tera.com